package com.itheima.service;

import com.itheima.bean.Student;
import com.itheima.dao.StudentDaoImpl;

import java.util.ArrayList;
import java.util.Date;

public class StudentServiceImpl implements StudentServiceInter {
    StudentDaoImpl dao = new StudentDaoImpl();

    @Override
    public ArrayList<Student> findAll() {
        ArrayList<Student> list = dao.findAll();
        return list;
    }

    @Override
    public Student findById(Integer id) {
        Student stu = dao.findById(id);
        return stu;
    }

    @Override
    public int insert(Student stu) {
        return dao.insert(stu);
    }

    @Override
    public int update(Student stu, Integer id) {
        return dao.update(stu,id);
    }

    @Override
    public int delete(Integer id) {
        return dao.delete(id);
    }
}
